XML Facility Modifiers
HAM 3.5 introduced an entire system for creating sector-related effects called "Facilities". The name may be misleading, as these "Facilities" are simply bonuses associated directly with a specific sector. A single facility binds one or more such bonuses (or penalties!) together under one name, and can be placed in any (one or more) sectors on the strategic map. The presence of a Facility can give a sector important strategic value, or it can make a sector less desirable to you. Structure of Facilities.XML The file Facilities.XML determines the placement of the available facilities around the map. You can place one facility in several sectors, or several facilities in one sector, as you please. The basic structure is simple. Follow these major guidelines: Example Facilities.XML Here's an example of an ENTIRE, functional XML. We will be placing three different facilities in two sectors (A1 and A2). A1 1 0 A1 2 1 A2 2 2 *The first entry places a facility of type 1 in sector A1. The ubHidden value of 0 means that the name of the facility will always be displayed when right-clicking the sector. *The second entry places a facility of type 2, also in sector A1. There will now be two facilities of different types, in the same sector. The ubHidden value of 1 means that until you actually explore the sector with your mercs, you cannot tell whether it contains this facility or not. After visiting, the name of the facility will be displayed as normal on the sector's right-click pop-up, for the rest of the game. *The third entry places another facility of type 2, this time in sector A2. So now there are two facilities of type 2 on the map. You can enjoy this facility's benefits in both sectors. The ubHidden value of 2 means that the name of this facility is never displayed on the sector's pop-up info box, so it's up to the player to discover the associated effect on his own. Structure of FacilityTypes.XML This file contains the data about each facility type. It holds the name of each facility type, and the bonuses/penalties associated with that facility. Each type has a unique number, which is used for placing that facility in any sector(s) on the map, using Facilities.XML (see above). The basic structure is very simple. Follow these guidelines: Example FacilityTypes.XML Here's an example of a simple set of Facility Types. Here, we're creating the three facilities that were originally added in HAM 3.3. 1 Gun Range 25 2 Factory 25 50 3 Hospital 25 25 90 *Facility #1 is a Gun Range. It will give a 25% bonus to Marksmanship Training rate in the sector(s) where it is placed. *Facility #2 is a Factory. It will give a 25% bonus to Repair '''rate in the sector(s) where it is placed, but only to mercs who have '''at least 50 Mechanical skill. *Facility #3 is a Hospital. It will give a 25% bonus to Medical Training rate in the sector(s) where it is placed. It will also add 25% bonus to Doctoring Rate, but only to mercs who have at least 90 Medical Skill. You can see how the first facility only has one modifier (sMarksmanshipTraining) while the other facilities have several tags. For best performance, new facilities should have as few tags as possible. If your new facility has many different tags, consider splitting it into two (or more!) separate facilities with fewer tags each. This will make sure that facilities don't get confused about what they should and should not do. Using the three numbers above, we can place these facilities on the map wherever we'd like, using Facilities.XML. Also note that you don't HAVE to place any of these facilities on your map. Alternately, you can place as many instances of these facilities as you'd like. Potentially, you could cover the entire map with sectors containing ALL three facilities. That would be pretty pointless, but you get the idea. Finally, you can make facilities that have NOTHING BUT A NAME. In fact, all facilities in the original Jagged Alliance 2 were nothing but names to be seen in the Sector's Right-Click Pop-up box. This adds flavour to a sector, but of course doesn't change its strategic value. Facility Modifier Tags - Overview and Basic Effects The most important part, of course, is being able to add effects to these facilties - otherwise, the facility isn't really doing anything. HAM 3.5 already allows a large plethora of different facility modifiers, which you can mix and match rather freely. A facility can have several modifiers (or even all of them at the same time), so the number of possible combinations is limited only by your imagination. Legend The tables below show how each modifier works. Each table contains a lot of data, so please make sure you understand the following concepts: Available Tags :Add these to the XML where appropriate. If you do not wish a facility to have a certain effect, do not add the tag at all. :Also don't forget to add a closing tag after the value. Refer to the XML examples earlier in this article. Modifier Range :The legal range for this modifier. All modifiers use NUMERIC values. Recommended Range :Unless you want funny things to happen, try to stay within this range of values. Default Value :If the modifier tag is completely missing from the XML Entry, the facility type is considered to have this value. :Of course, a facility doesn't need to have ANY tags set (in which case, it is just a name that appears on the sector's extra info pop-up). You only need to add a tag to your facility if you wish to give that tag a relevant, non-default value. Effect Type :The type of effect generated by this tag. See the box above for more information about types. Effect :A short description of the effect that this tag generates in the sector(s) where the facility is placed. Example :A short description of the effect as it is used in one of HAM 3.5's new facilities. Training Modifiers Militia Training Modifier Number of Militia Trainers Allowed Jobbing Modifiers Required Skill for Jobbing Modifiers Fatigue Regain Modifiers Fatigue Loss Modifiers Maximum Possible Fatigue Morale Modifier Maximum Possible Morale Dynamic Enemy Detection Long-Range Enemy Detection Global Enemy Detection Count Enemies in the Wilderness Count Enemies in Cities Required Wisdom for Detection/Counting Effects Helicopter Flight Costs Modifier See Also Advanced Facility Modding Category:Features Category:HAM Facilities Category:Strategic Features